package edu.gatech.cs2340.teamrocket.model.storage;

import edu.gatech.cs2340.teamrocket.model.item.Item;

/**
 * Interface for any class that will hold Items.
 *
 * @author Joe Tacheron
 */
public interface Storage {

    /**
     * Get the quantity of an item in this Storage
     *
     * @param i the Item
     * @return the quantity of Item i
     */
    int getQuantity(Item i);

    /**
     * Check if this Storage contains an Item
     *
     * @param i the Item
     * @return true if this Storage contains i, false otherwise
     */
    boolean contains(Item i);

    /**
     * Set the money amount.
     *
     * @param m new money amount
     */
    void setMoney(double m);

    /**
     * Get the money amount
     *
     * @return the money amount
     */
    double getMoney();

    /**
     * Checks that this Storage is in a valid state. This could mean to check
     * that money is positive, a weight limit has not been surpassed, etc.
     */
    void validate();

    /**
     * Essentially become the BasicStorage parameter. This will shallowly copy
     * each field in the parameter BasicStorage into this BasicStorage.
     *
     * @param bs the BasicStorage to become
     */
    @Deprecated
    void become(BasicStorage bs);

    /**
     * Remove all items in this Storage
     */
    void clear();
}
